/**
 emma_project
 Copyright (C) 2015  Rodrigo Garcia

 This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef USERSERIALINTERFACE_H

#define USERSERIALINTERFACE_H

#include <stdio.h>
#include "usartio.h"
#include "rtcDS3231.h"
#include "DataLogger.h"
#include "TimeChecker.h"

#define MAIN_MENU 0
#define ADD_REMOVE_SENSOR 10
#define CLOCK 20
#define TIME_INTERVAL 30
#define QUIT 100

//#include "ProgMemStrings.h"

unsigned char user_serial_interface_state;

// Manages User serial interface
void SerialUserInterface(void);

void ShowAddRemoveSensorMenu(unsigned char s_index);

// returns 1 if sensor(s_index) is Enabled
char CheckIfSensorIsEnabled(unsigned char s_index, unsigned char eeprom_byte);

//utils
void ClearSerialScreen(void);
void ShowClockmenu(char i);
void ShowTime(const char *time);
void ShowClock(void);
char ValidateTime(const char *time);
#endif
